package com.sicnustray.mapper;

import com.sicnustray.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yl
 * @since 2022-11-09
 */
@Mapper
public interface RoleMapper extends BaseMapper<Role> {

//    @Select("select flag from role where id=#{id}")
//    String selectByFlag(@Param("id") Integer roleId);

    @Select("select id from role where name=#{role}")
    Integer selectByRole(@Param("role") String role);
}
